a = []
for i in range(1, 7):
    with open("order"+str(i)+".txt", "r") as fp:
        a.append(fp.readline().strip())

aa = a[4].split(" ")
bb = a[5].split(" ")
for i in range(len(aa)):
    if aa[i]==bb[i]:
        continue
    else :
        print(aa[i], bb[i])
        break
